package com.matouli.trigger.listener;


import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * RocketMQ 接收消息
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "matouli-mq", consumerGroup = "matouli-group")
public class MQListener implements RocketMQListener<String> {


    @Override
    public void onMessage(String s) {
        log.info("接收到MQ消息{}", s);
    }
}
